#ifndef HALFPROXY_AUTH_H_
#define HALFPROXY_AUTH_H_

#include "tcetools/socket.h"
#include <string>

void gen_challenge(char challenge[16]);
void gen_response(char response[16], char challenge[16], 
		std::string secret);

void check_auth_client(tcetools::IPSocket &s, std::string secret, std::string tag);
void check_auth_server(tcetools::IPSocket &s, std::string secret, std::string tag);
#endif /* HALFPROXY_AUTH_H_ */
